/*
 * @Author: 晟松
 * @Date: 2021-11-30 15:38:41
 * @LastEditors: 晟松
 * @LastEditTime: 2021-12-08 15:56:29
 * @FilePath: \mini-vue3d:\Code\node\koa2\volunteer-service\src\main\util\Log4jsUtil.js
 * @Description: 
 */
import log4js from 'log4js';
import log4jsConfig from '@main/config/log4js';

log4js.configure(log4jsConfig);

const defaultLogger = log4js.getLogger();
const errorLogger = log4js.getLogger('error');

export const debug = (message) => {
  defaultLogger.debug(message);
};

export const info = (message) => {
  defaultLogger.info(message);
};

export const warn = (message) => {
  defaultLogger.warn(message);
};

export const error = (message) => {
  defaultLogger.error(message);
  errorLogger.error(message);
};
